package com.qingcloud.fexecutor.base.enums;

/**
 * API状态枚举
 *
 * @author wangjinnan
 */
public enum ProjectStateEnum {

    /**
     * 开发中
     */
    DEVELOP(1, "开发中"),

    /**
     * 已提交
     */
    SUBMIT(2, "已提交"),

    /**
     * 已发布
     */
    PUBLISH(3, "已发布");

    /**
     * 类型编码
     */
    public final Integer code;
    public final String desc;

    ProjectStateEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDesc(Integer code) {
        for (ProjectStateEnum it : ProjectStateEnum.values()) {
            if (it.code.equals(code)) {
                return it.desc;
            }
        }
        return "";
    }
}
